var EventEmitter =require('events').EventEmitter;

var life = new EventEmitter();


life.setMaxListeners(12) ;

life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});

life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});
life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});
life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});
life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});
life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});
life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});
life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});

life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水');
});


function water(who){

	console.log('给' + who + ' 倒水111');
}


life.on('求安慰',water);

life.removeListener('求安慰',water);


life.on('求安慰',function(who){

	console.log('给' + who + ' 倒水1');
});

life.removeAllListeners();


var status = life.emit('求安慰','汉子');

console.log(status);


console.log(life.listeners('求安慰').length);